import { Component, OnInit } from '@angular/core';
import { Router, NavigationExtras } from '@angular/router';
import {TranslateService} from '@ngx-translate/core';
import { DefaultLanguageService } from '../../../services/default-language.service';

@Component({
  selector: 'app-statement',
  templateUrl: './statement.page.html',
  styleUrls: ['./statement.page.scss'],
})
export class StatementPage implements OnInit {

  constructor(
    private router: Router,
    private translate: TranslateService,
    private defaultLanguageService:DefaultLanguageService
  ) {
    let defultLanguage = this.defaultLanguageService.getDefaultLanguage();
    this.translate.setDefaultLang(defultLanguage);
    this.translate.use(defultLanguage);
  }

  ngOnInit() {
  }

  backToAccount(){
    this.router.navigate(['/tabs/myAccount']);
  }

  toPay(){
    this.router.navigate(['/tabs/myAccount/repayment']);
  }

  toInstallment(){
    this.router.navigate(['/tabs/myAccount/installment']);
  }
}
